package org.example.controller;

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.example.bean.login.User;
import org.example.service.AthService;
import org.example.service.UserService;
import org.example.util.JsonResult;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther:Liu
 * @Testname:AthControllerr
 * @Date:2025/8/13 17:41
 */
@CrossOrigin
@RestController
@RequestMapping("/ath")
public class AthController {
    @Resource
    private AthService athService;



    @GetMapping("/is_login")
    public JsonResult IsLogin(HttpServletRequest request) {
        return athService.isLogin(request.getHeader("token"));
    }

    @DeleteMapping("/loginout")
    public JsonResult Loginout(HttpServletRequest request) {
        return athService.Loginout(request.getHeader("token"));
    }


}
